Skip to content

fixes to application mapper (fixes #1147)#1261

Open
massemanet wants to merge 3 commits into
rvaiya:masterfrom
massemanet:master
Open

fixes to application mapper (fixes #1147)#1261
massemanet wants to merge 3 commits into
rvaiya:masterfrom
massemanet:master

Conversation

@massemanet

Copy link
Copy Markdown

fix application mapper for modern COSMIC DE (fixes #1147)

Also:
handle partial reads from Wayland socket
support KEYD_APP_CONF env var to override the config file path

  sock.recv() is not guaranteed to return all requested bytes in one call;
  replace bare recv() calls with a recvall() loop throughout.

  Split recv_msg() into _recv_raw() (direct socket read) and recv_msg()
  (drains a _pending buffer first). _bind_interfaces() now uses _recv_raw()
  and buffers any non-registry, non-sync messages into _pending so they are
  not silently discarded before run() starts. This is necessary for
  compositors that send initial toplevel state during the bind phase.

  Also track the next client-side object ID (_next_id / alloc_id()) for use
  by monitor classes that need to create server-side objects.
  COSMIC DE changed its Wayland protocol architecture: zcosmic_toplevel_info_v1
  no longer acts as a standalone toplevel manager. It now works as a
  supplementary interface alongside the standardised ext_foreign_toplevel_list_v1.

  Update the Cosmic class to:
  - Bind both ext_foreign_toplevel_list_v1 and zcosmic_toplevel_info_v1
  - On each new ext_foreign_toplevel_handle_v1, call get_cosmic_toplevel()
    to obtain a zcosmic_toplevel_handle_v1 for activation state
  - Read title and app_id from ext_foreign_toplevel_handle_v1 (events 2/3)
  - Detect window activation from zcosmic_toplevel_handle_v1 state (event 8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

keyd-application-mapper is broken on modern Cosmic DE due to Wayland protocol changes

1 participant